package com.eudon.imagesearchmcpserver.config;

import com.eudon.imagesearchmcpserver.tools.ImageSearchTool;
import jakarta.annotation.Resource;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author eudon
 * @description 配置ToolCallbackProvider
 * @date 2025/8/26
 * @email syd19970616@gmail.com
 * @address <a href="https://gitee.com/eudon">Gitee</a>
 */
@Configuration
public class ToolCallbackConfig {
    @Resource
    private ImageSearchTool imageSearchTool;
    @Bean
    public ToolCallbackProvider toolCallbacks() {
        return MethodToolCallbackProvider.builder()
                .toolObjects(imageSearchTool)
                .build();
    }
}
